package mk.jug.academy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;

/**
 * Entity class modeling a review for a {@link Student}.
 *
 * @author Ice.Penov
 */
@Entity
public class StudentReview extends RootEntity {
	
	public static final String CODE_PREFIX = "REV-";		
	
	@Column @Lob
	private String review;
	
	@Column(nullable = false)
	private StudentReviewStatus status;
	
	@Column(nullable = false)
	private Long lecturerID;
	
	@Column(nullable = false)
	private String lecturerDisplayName;
	
	@Column(nullable = false)
	private Long studentID;
	
	@Column(nullable = false)
	private String studentDisplayName;

	/**
	 * Returns the code.
	 */
	public String getCode() {
		return CODE_PREFIX + getId();
	}
	
	/**
	 * Returns the review.
	 */
	public String getReview() {
		return review;
	}

	/**
	 * Setter for the review.
	 */
	public void setReview(String review) {
		this.review = review;
	}

	/**
	 * Returns the status.
	 */
	public StudentReviewStatus getStatus() {
		return status;
	}

	/**
	 * Setter for the status.
	 */
	public void setStatus(StudentReviewStatus status) {
		this.status = status;
	}

	/**
	 * Returns the lecturerID.
	 */
	public Long getLecturerID() {
		return lecturerID;
	}

	/**
	 * Setter for the lecturerID.
	 */
	public void setLecturerID(Long lecturerID) {
		this.lecturerID = lecturerID;
	}

	/**
	 * Returns the studentID.
	 */
	public Long getStudentID() {
		return studentID;
	}

	/**
	 * Setter for the studentID.
	 */
	public void setStudentID(Long studentID) {
		this.studentID = studentID;
	}

	/**
	 * Returns the lecturerDisplayName.
	 */
	public String getLecturerDisplayName() {
		return lecturerDisplayName;
	}

	/**
	 * Setter for the lecturerDisplayName.
	 */
	public void setLecturerDisplayName(String lecturerDisplayName) {
		this.lecturerDisplayName = lecturerDisplayName;
	}

	/**
	 * Returns the studentDisplayName.
	 */
	public String getStudentDisplayName() {
		return studentDisplayName;
	}

	/**
	 * Setter for the studentDisplayName.
	 */
	public void setStudentDisplayName(String studentDisplayName) {
		this.studentDisplayName = studentDisplayName;
	}
	
}